<template>
  <div id="app">
    <!-- tab标签 -->
    <ul id="myTab" class="nav nav-tabs">
      <li class="active">
        <a href="#home" data-toggle="tab">时段</a>
      </li>
      <li>
        <a href="#ios" data-toggle="tab">区域</a>
      </li>
    </ul>
    <!-- 每个tab页对应的内容 -->
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane fade in active" id="home">
        <form class="form-horizontal" role="form">
          <iframe
            id="iframeTime"
            name="iframeTime"
            width="100%"
            height="600"
            frameborder="no"
            border="0"
            marginwidth="0"
            marginheight="0"
            scrolling="yes"
            allowtransparency="yes"
            src="?#/page/program/listplay"
          ></iframe>
        </form>
      </div>

      <div class="tab-pane fade in" id="ios">
        <form class="form-horizontal" role="form">
          <iframe id="iframesios" name="iframesios" src="?#/page/program/location" width="800" height="800" frameborder="no" border="0"  marginwidth="0"  marginheight="0" scrolling="yes" allowtransparency="yes"></iframe>
        </form>
      </div>
    </div>
  </div>
</template>
<style>
@import "../../../../static/css/ztree/metroStyle.css";

@import "../../../../static/css/mloading/jquery.mloading.css";
#myTabContent form{
  margin-top: 30px;
 }
</style>

<script>

import "../../../../static/js/jqgrid/jquery.jqGrid.min.js";
import "../../../../static/js/jqgrid/grid.locale-cn.js";
import "../../../../static/js/page/Program/listplay.js";
import "../../../../static/js/mloading/jquery.mloading.js";

import "../../../../static/js/time/timer.js";

import loading from "@/views/tree/companydeviceselect.vue";


export default {
  name: "app",
  data() {
    return {

    };
  },
  mounted() {
     //不同内核下iframe路径跳转
    var userAgent = navigator.userAgent;
    var isChrome = navigator.userAgent.indexOf("Chrome") > -1;
    var isFirefox = navigator.userAgent.indexOf("Firefox") > -1;
    var urltime = "?#/page/program/listplay";
     var urlyu = "?#/page/program/location";
    if (isFirefox || isChrome) {
      //时段
      var iframTime = document.getElementById("iframeTime");
      iframId.src = urltime;
      //区域
       var iframId = document.getElementById("iframesios");
      iframId.src = urlyu;
    } else {
      document.frames["iframeTime"].location.href = urltime;
      document.frames["iframesios"].location.href = urlyu;
    }

  },
  methods: {},
  components: {
    loading: loading
  }
};
</script>